package org.smile.db;


import java.util.List;

import org.smile.json.JSONObject;
/**
 * 分页数据
 * @author strive
 *
 */
public class PageModel<E> {
	
	/**
	 * 数据
	 */
	private List<E> rows;
	/**
	 * 总条娄
	 */
	private long total;
	/**
	 * 一页条数
	 */
	private int size=20;
	/**
	 * 当前页
	 */
	private int page;
	
	/**
	 * 总页数
	 */
	private long totalPages;
	
	
	
	public List<E> getRows() {
		return rows;
	}
	public void setRows(List<E> rows) {
		this.rows = rows;
	}
	public long getTotal() {
		return total;
	}
	public void setTotal(long total) {
		this.total = total;
	}
	public int getSize() {
		return size;
	}
	public void setSize(int size) {
		this.size = size;
	}
	public int getPage() {
		return page;
	}
	public void setPage(int page) {
		this.page = page;
	}
	public long getTotalPages() {
		return totalPages;
	}
	public void setTotalPages(long totalPages) {
		this.totalPages = totalPages;
	}
	/**
	 * 重写toString
	 */
	public String toString(){
		return JSONObject.toJSONString(this);
	}
}

